cmake_minimum_required(VERSION 2.6)
project(Realmd)

include_directories(
    ${PROJECT_SOURCE_DIR}
)

set(RealmdSRC
    ErrorHandler.cc
    Global.h
    RealmdApplication.h
    RealmdApplication.cc
    RealmList.h
    RealmList.cc
    Realmd.h
    
    Net/AuthTcpConnection.h
    Net/AuthTcpConnection.cc
    Net/AuthTcpConnectionFactory.h
    Net/ConnectionManager.h
    Net/ConnectionManager.cc
)
if(WIN32)
set(RealmdSRC
    Main_WIN32.cc
${RealmdSRC})
endif()

add_executable(Realmd 
    ${RealmdSRC}
)
target_link_libraries(Realmd
    Ucop
    ${Libevent_Libs}
    ${TinyXML_Libs}
    ${MySQL_Libs}
    ${OpenSSL_Libs}
    Shared
)

if (WIN32)
target_link_libraries(Realmd ws2_32 dbghelp)
endif()